Skip to content

Promote Vue 3 to default UI at /, demote Vue 2 to /ui-old/#1178

Merged
Tim020 merged 3 commits into
devfrom
feature/swap-default-ui
Jun 10, 2026
Merged

Promote Vue 3 to default UI at /, demote Vue 2 to /ui-old/#1178
Tim020 merged 3 commits into
devfrom
feature/swap-default-ui

Conversation

@Tim020

@Tim020 Tim020 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Vue 3 (client-v3/) is now served as the default UI at /, replacing the Vue 2 catch-all
  • Vue 2 (client/) is now served at /ui-old/ with its own dedicated routes and static asset handler
  • The default_ui server setting now defaults to "new"; visiting / redirects to /ui-old/ only when an admin has explicitly set it to "old"
  • Docs generation (prebuild scripts) moved from V2 to V3, since V3 now owns server/static/

Changes

Build configs

  • client-v3/vite.config.ts: base /ui-new//, outDir → server/static/, emptyOutDir: false with a new cleanV3StaticPlugin that preserves ui-old/ on each build
  • client/vite.config.ts: base //ui-old/, outDir → server/static/ui-old/, emptyOutDir: true (V2 owns that dir fully; custom clean plugin removed)

Backend

  • app_server.py: routes and static handlers updated (/ui-old/assets/, /ui-old/RootController, / catch-all → RootControllerV3)
  • controllers.py: redirect logic moved to RootControllerV3 (redirects //ui-old/ when default_ui == "old"); RootController simplified to serve static/ui-old/index.html synchronously
  • settings.py: default_ui default changed from "old" to "new"

Frontend

  • client-v3/src/App.vue: "Switch to Classic UI" link updated to /ui-old/?_switch=1
  • client/src/App.vue: "Switch to New UI" link updated to /?_switch=1
  • client-v3/src/router/index.ts: router base changed from /ui-new/ to /
  • client-v3/e2e/helpers.ts: UI_BASE updated (no /ui-new suffix)

Docs

  • copy-docs.sh and generate-doc-manifest.ts moved to client-v3/scripts/ and wired into V3's prebuild; removed from V2's prebuild

Test plan

  • Visit http://localhost:8080/ — V3 (new UI) loads
  • Visit http://localhost:8080/ui-old/ — V2 (classic UI) loads
  • Both UIs show correct "Switch to Classic UI" / "Switch to New UI" nav links
  • Help/docs pages load in both UIs (/help/getting-started)
  • npm run build in client-v3/ outputs to server/static/ and generates server/static/docs/
  • npm run build in client/ outputs to server/static/ui-old/
  • Run full Playwright E2E suite: cd client-v3 && npm run test:e2e
  • Run backend tests: cd server && pytest

🤖 Generated with Claude Code

Tim020 and others added 2 commits June 9, 2026 13:23
- V3 now served as the catch-all at / with default_ui setting changed to "new"
- V2 served at /ui-old/ with its own dedicated routes and static asset handler
- Backend redirect logic moved to RootControllerV3: redirects / → /ui-old/ when default_ui == "old"
- Both clients' vite base/outDir updated; V3 gains a clean plugin preserving ui-old/
- UI-switch nav links and preference redirects updated to new paths in both apps
- E2E UI_BASE updated to reflect V3 now living at the server root

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The docs prebuild (copy-docs.sh + generate-doc-manifest.ts) was in the
V2 client, which used Vite's public/ copy mechanism to deposit docs into
the outDir. When V2's outDir moved to server/static/ui-old/, docs were
landing in ui-old/docs/ instead of server/static/docs/.

V3 now owns docs generation since it builds to the server/static/ root.
Scripts are copied to client-v3/scripts/ with a mkdir -p guard added
for the previously-absent public/ directory in V3.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Tim020 Tim020 added the claude Issues created by Claude label Jun 9, 2026
@github-actions github-actions Bot added client Pull requests changing front end code server Pull requests changing back end code medium-diff client-v3 labels Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Client V3 Test Results

23 tests  ±0   23 ✅ ±0   0s ⏱️ ±0s
 2 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 2fa3b15. ± Comparison against base commit d45397e.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Client Test Results

128 tests  ±0   128 ✅ ±0   0s ⏱️ ±0s
  6 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 2fa3b15. ± Comparison against base commit d45397e.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Python Test Results

  1 files  ±0    1 suites  ±0   2m 12s ⏱️ +29s
662 tests ±0  662 ✅ ±0  0 💤 ±0  0 ❌ ±0 
667 runs  ±0  667 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 2fa3b15. ± Comparison against base commit d45397e.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Playwright E2E Results (firefox)

175 tests  ±0   175 ✅ ±0   1m 52s ⏱️ ±0s
 14 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 2fa3b15. ± Comparison against base commit d45397e.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Playwright E2E Results (chromium)

175 tests  ±0   175 ✅ ±0   1m 50s ⏱️ -2s
 14 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 2fa3b15. ± Comparison against base commit d45397e.

♻️ This comment has been updated with latest results.

- Fix Prettier formatting in client-v3/src/App.vue (Switch to Classic UI nav item)
- Move COPY /docs from build_v2 to build_v3 stage (V3 now owns docs generation)
- Update build_v3 mkdir to /server/static (was /server/static/ui-new)
- Update final COPY --from=build_v3 to copy from /server/static root (was /server/static/ui-new)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
3 Security Hotspots
59.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@Tim020 Tim020 merged commit 858814a into dev Jun 10, 2026
34 of 35 checks passed
@Tim020 Tim020 deleted the feature/swap-default-ui branch June 10, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude Issues created by Claude client Pull requests changing front end code client-v3 medium-diff server Pull requests changing back end code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant